<!DOCTYPE html>
<html lang="zh-CN">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>网站首页</title>
    <style>
        /* 全局样式*/
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        body {
            font-family: Arial, sans-serif;
            background-color: #f4f4f4;
        }

        /* 头部样式*/
        header {
            background-color: #333;
            color: white;
            text-align: center;
            padding: 20px;
        }

        /* 导航栏样式*/
        nav {
            background-color: #444;
            overflow: hidden;
        }

        nav ul {
            list-style-type: none;
            display: flex;
            justify-content: space-around;
            padding: 10px 0;
        }

        nav ul li {
            cursor: pointer;
        }

        nav ul li a {
            color: white;
            text-decoration: none;
        }

        /* 景点卡片样式*/
       .card {
            background-color: white;
            border-radius: 10px;
            box-shadow: 0 0 5px rgba(0, 0, 0, 0.2);
            margin: 20px;
            padding: 10px;
            overflow: hidden;
        }

       .card img {
            width: 100%;
            height: auto;
            border-radius: 10px;
            margin-bottom: 10px;
        }

       .card h2 {
            margin-bottom: 10px;
        }

       .card p {
            color: #666;
        }
        .card a {
            text-decoration: none;
            display: block;
            text-align: center;
        }
        /* 底部样式*/
        footer {
            background-color: #333;
            color: white;
            text-align: center;
            padding: 10px;
            position: fixed;
            bottom: 0;
            width: 100%;
        }

        /* 响应式调整*/
        @media (max-width: 600px) {
            nav ul {
                flex-direction: column;
            }

            nav ul li {
                margin: 5px 0;
            }
        }

        /* 轮播图样式 */
        .slider-container {
            position: relative;
            max-width: 800px;
            margin: 20px auto;
            overflow: hidden;
        }

        .slider {
            display: flex;
            transition: transform 0.5s ease;
        }

        .slide {
            min-width: 100%;
        }

        .slide img {
            width: 100%;
            height: auto;
        }

        .prev-btn, .next-btn {
            position: absolute;
            top: 50%;
            transform: translateY(-50%);
            background: rgba(0, 0, 0, 0.5);
            color: white;
            border: none;
            padding: 10px;
            cursor: pointer;
            font-size: 18px;
        }

        .prev-btn {
            left: 10px;
        }

        .next-btn {
            right: 10px;
        }

        .slider-dots {
            position: absolute;
            bottom: 10px;
            left: 50%;
            transform: translateX(-50%);
            display: flex;
            gap: 5px;
        }

        .dot {
            width: 10px;
            height: 10px;
            background: rgba(255, 255, 255, 0.5);
            border-radius: 50%;
            cursor: pointer;
        }

        .dot.active {
            background: white;
        }
    </style>
</head>

<body>
    <!-- 头部 -->
    <header>
        <h3>学海无涯</h3>
    </header>

    <!-- 导航栏 -->
    <!--<nav>
        <ul>
            <li><a href="#">小学</a></li>
            <li><a href="#">初中</a></li>
            <li><a href="#">高中</a></li>
        </ul>
    </nav>-->

    <!-- 轮播图 -->
    <div class="slider-container">
        <div class="slider">
            <div class="slide">
                <a href="https://pan.quark.cn/s/2e093041cbc7"><img src="images/1.png?text=图片1" alt="轮播图1"></a>
            </div>
            <div class="slide">
                <a href="https://pan.quark.cn/s/fde05b0a68bc"><img src="images/2.png?text=图片2" alt="轮播图2"></a>
            </div>
            <div class="slide">
                <a href="https://pan.quark.cn/s/7cd94e0eb714"><img src="images/3.png?text=图片3" alt="轮播图3"></a>
            </div>
            <div class="slide">
                <a href="https://pan.quark.cn/s/9b4f34cd8e06"><img src="https://huangjun193.gitee.io/images/4.png?text=图片4" alt="轮播图4"></a>
            </div>
        </div>
        <button class="prev-btn">❮</button>
        <button class="next-btn">❯</button>
        <div class="slider-dots">
            <span class="dot active"></span>
            <span class="dot"></span>
            <span class="dot"></span>
            <span class="dot"></span>
        </div>
    </div>

    <!-- 景点卡片 -->
    <div class="card">
        <a href="https://pan.quark.cn/s/517b8c2b15d3"><img src="" alt="">小学专区</a>
    </div>

    <div class="card">
        <a href="https://pan.quark.cn/s/e73dba3ffa35"><img src="" alt="">初中专区</a>
    </div>
    <div class="card">
        <a href="https://pan.quark.cn/s/e266c9b5c8fd"><img src="" alt="">高中专区</a>
    </div>
    <div class="card">
        <a href="https://pan.quark.cn/s/f73f18804d73"><img src="" alt="">大学专区</a>
    </div>
    <div class="card">
        <a href="https://pan.quark.cn/s/46dd6c023398"><img src="" alt="">专升本区</a>
    </div>
    <div class="card">
        <a href="https://pan.quark.cn/s/252f4e3eb40b"><img src="" alt="">考研专区</a>
    </div>
    <div class="card">
        <a href="https://pan.quark.cn/s/02e63a9f524f"><img src="" alt="">考公专区</a>
    </div>
    <div class="card">
        <a href="https://pan.quark.cn/s/fde05b0a68bc"><img src="" alt="">董宇辉老师英语</a>
    </div>
    <div class="card">
        <a href="https://pan.quark.cn/s/63b814688151"><img src="" alt="">AI实操课</a>
    </div>
    <div class="card">
        <a href="https://pan.quark.cn/s/7cd94e0eb714"><img src="" alt="">更多...</a>
    </div>
    <!-- 底部 -->
    <footer>
        &copy; 2025 网站。保留所有权利
    </footer>

    <script>
        // 轮播图功能
        const slider = document.querySelector('.slider');
        const slides = document.querySelectorAll('.slide');
        const dots = document.querySelectorAll('.dot');
        const prevBtn = document.querySelector('.prev-btn');
        const nextBtn = document.querySelector('.next-btn');
        let currentSlide = 0;
        let slideInterval;

        function updateSlider() {
            slider.style.transform = `translateX(-${currentSlide * 100}%)`;
            dots.forEach((dot, index) => {
                dot.classList.toggle('active', index === currentSlide);
            });
        }

        function nextSlide() {
            currentSlide = (currentSlide + 1) % slides.length;
            updateSlider();
        }

        function prevSlide() {
            currentSlide = (currentSlide - 1 + slides.length) % slides.length;
            updateSlider();
        }

        function startAutoSlide() {
            slideInterval = setInterval(nextSlide, 3000);
        }

        function stopAutoSlide() {
            clearInterval(slideInterval);
        }

        prevBtn.addEventListener('click', () => {
            stopAutoSlide();
            prevSlide();
            startAutoSlide();
        });

        nextBtn.addEventListener('click', () => {
            stopAutoSlide();
            nextSlide();
            startAutoSlide();
        });

        dots.forEach((dot, index) => {
            dot.addEventListener('click', () => {
                stopAutoSlide();
                currentSlide = index;
                updateSlider();
                startAutoSlide();
            });
        });

        startAutoSlide();

        // 简单的导航栏点击事件示例
        const navLinks = document.querySelectorAll('nav ul li a');
        navLinks.forEach(link => {
            link.addEventListener('click', function (e) {
                e.preventDefault();
                const target = this.textContent.toLowerCase();
                // 这里可以添加根据点击的链接进行页面跳转或内容显示的逻辑
                console.log(`点击了 ${target} 链接`);
            });
        });
    </script>
</body>

</html>
